

package example.serialization;

import java.util.Objects;
import java.util.UUID;

public class CompactWithInnerFieldAsUuid {
    private final UUID uuid;

    public CompactWithInnerFieldAsUuid(UUID uuid) {
        this.uuid = uuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CompactWithInnerFieldAsUuid that = (CompactWithInnerFieldAsUuid) o;

        return Objects.equals(uuid, that.uuid);
    }

    @Override
    public int hashCode() {
        return uuid != null ? uuid.hashCode() : 0;
    }
}
